
package com.common.android.utils.httpRequest;

import java.io.File;

import org.apache.http.HttpEntity;
import org.json.JSONObject;

import android.graphics.Bitmap;

/**
 * ClassName:IHttpRequest Function: TODO ADD FUNCTION Reason: TODO ADD REASON
 * 
 * @author yanyy
 * @version
 * @since Ver 1.0
 * @Date 2011 2011-10-11 下午02:14:56
 * @see
 */
public interface IHttpRequest {
    /**
     * @Title: doPost
     * @Description: HTTP post请求
     * @author Administrator
     * @date 2012-2-1 上午09:37:47
     * @param m_strURL
     * @param c
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doPost(String m_strURL, JSONObject c, StringBuilder receive);

    /**
     * @Title: doPost
     * @Description: HTTP post请求
     * @author Administrator
     * @date 2012-2-1 上午09:37:55
     * @param m_strURL
     * @param content
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doPost(String m_strURL, String content, StringBuilder receive);

    /**
     * @Title: doPost
     * @Description: HTTP post请求
     * @author Administrator
     * @date 2012-2-1 上午09:38:05
     * @param m_strURL
     * @param b
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doPost(String m_strURL, byte[] b, StringBuilder receive);
    
    public int doPost(String url, HttpEntity entity, StringBuilder receive);

    /**
     * @Title: doPut
     * @Description: HTTP put请求
     * @author Administrator
     * @date 2012-2-1 上午09:38:10
     * @param m_strURL
     * @param content
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doPut(String m_strURL, String content, StringBuilder receive);

    /**
     * @Title: doPut
     * @Description: HTTP put 请求
     * @author Administrator
     * @date 2012-2-1 上午09:37:51
     * @param m_strURL
     * @param c
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doPut(String m_strURL, JSONObject c, StringBuilder receive);

    /**
     * @Title: doGet
     * @Description: HTTP get请求
     * @author Administrator
     * @date 2012-2-1 上午09:38:13
     * @param m_strURL
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doGet(String m_strURL, StringBuilder receive);
    
    /**
     * @Title: doGet
     * @Description: HTTP get请求,服务端使用GBK编码
     * @author Administrator
     * @date 2012-2-1 上午09:38:13
     * @param m_strURL
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doGetGBK(String m_strURL, StringBuilder receive);

    /**
     * @Title: doDelete
     * @Description: HTTP delete请求
     * @author Administrator
     * @date 2012-2-1 上午09:38:16
     * @param m_strURL
     * @param receive
     * @return
     * @return int
     * @throws
     */
    public int doDelete(String m_strURL, StringBuilder receive);

    /**
     * @Title: doDownFile
     * @Description: 下载小文件
     * @author Administrator
     * @date 2012-2-1 上午09:38:20
     * @param m_strURL
     * @param saveFile
     * @return
     * @return int
     * @throws
     */
    public int doDownFile(String m_strURL, File saveFile);

	public void setSid(String sid);
	public int doUploadImage(String url, Bitmap bitmap, String httpMethod);
	/**
	 * 设置头部请求代理。
	 * <br>Created 2014-5-20 上午11:42:30
	 * @param agent_ob 代理句柄
	 * @author       suchangjun
	*/
	public void setAgent(ISetHeadAgent agent_ob);
	
	/**
	 * 执行带body的httpdelete
	 * 
	 * <br>Created 2014-6-20 下午6:25:01
	 * @param mStrURL  url
	 * @param entity   body内容
	 * @param receive  响应内容
	 * @return int
	 * @author        :  huangszh
	 */
	 int doDeleteWithEntity(String mStrURL,HttpEntity entity, StringBuilder receive);
}
